using System.ComponentModel;
using System.Drawing;
using System.IO;
using System.Windows.Forms;

namespace MEA.AE_BusinessLogic
{
	public class UIFileInfo : Form
	{
		private RichTextBox fileInfoTextBox;

		private IContainer components;

		public UIFileInfo(MemoryStream str, int iBoxHigh, Point loc)
		{
			InitializeComponent();
			fileInfoTextBox = new RichTextBox();
			Size size = base.Size;
			if (iBoxHigh < 26)
			{
				size.Width += 12;
			}
			else
			{
				size.Width += 96;
			}
			size.Height = iBoxHigh * 12 + 128;
			if (size.Height > 640)
			{
				size.Height = 640;
			}
			base.Size = size;
			CenterToScreen();
			loc.X -= 100;
			loc.Y -= 50;
			base.Location = loc;
			fileInfoTextBox.Size = new Size(base.Size.Width - 16, base.Size.Height - 56);
			fileInfoTextBox.SelectionBackColor = Color.Cornsilk;
			base.Controls.Add(fileInfoTextBox);
			fileInfoTextBox.ResumeLayout(true);
			ResumeLayout(true);
			PerformLayout();
			fileInfoTextBox.AllowDrop = false;
			if (str != null)
			{
				str.Position = 0L;
				fileInfoTextBox.LoadFile(str, RichTextBoxStreamType.RichText);
			}
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MEA.AE_BusinessLogic.UIFileInfo));
			base.SuspendLayout();
			base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			base.ClientSize = new System.Drawing.Size(316, 261);
			base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			base.Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
			base.Name = "UIFileInfo";
			base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "FileInfo";
			base.ResumeLayout(false);
		}
	}
}
